package com.v5ba.service.impl;

import com.v5ba.sms.entity.User;
import com.v5ba.sms.entity.Users;
import com.v5ba.sms.service.UserService;
import org.apache.dubbo.config.annotation.DubboService;

import java.util.ArrayList;
import java.util.List;

@DubboService(version = "1.0.0")
public class UserServiceImpl implements UserService {

    @Override
    public User getUser() {
        User user = new User();
        user.setAge(30);
        user.setName("张彦辉");
        user.setId("1000");
        return user;
    }

    @Override
    public Users getUsers() {
        Users users = new Users();
        users.setCode("200");
        List<User> resul = new ArrayList<>();
        User user = new User();
        user.setAge(30);
        user.setName("张彦辉");
        user.setId("1000");
        resul.add(user);
        users.setData(resul);
        return users;
    }

}
